//
// Created by f12160c on 2018/6/15.
//

#ifndef LEARNALGORITHM_LEETCODE_HPP
#define LEARNALGORITHM_LEETCODE_HPP

#include <iostream>

struct ListNode {
    int val;
    ListNode *next;

    ListNode(int x) : val(x), next(nullptr) {}
};

class Solution {
public:
    static std::vector <std::vector<int>> threeSum(std::vector<int> &nums);
    static std::vector<std::string> letterCombinations(std::string digits);
    static std::vector<std::string> letterCombinations_1(std::string digits);
    static std::vector <std::vector<int>> fourSum(std::vector<int> &nums, int target);
    static std::vector<std::string> generateParenthesis(int n);
    static ListNode* swapPairs(ListNode* head);
    static int strStr(std::string haystack, std::string needle);
    static int divide(int dividend, int divisor);
    static std::vector<int> findSubstring(std::string s, std::vector<std::string>& words);
    static std::vector<int> findSubstring_1(std::string s, std::vector<std::string>& words);
    static void solveSudoku(std::vector<std::vector<char>>& board);
};

#endif //LEARNALGORITHM_LEETCODE_HPP
